The present invention relates to computers. In particular it relates to converting color signals so that they can be displayed on a monochrome liquid crystal display ("LCD") or other monochrome displays.
The problem of converting a color signal used to drive a color-capable cathode ray tube ("CRT") to a video signal capable of driving a monochrome display is known. Several methods have been devised for solving the problem, but no solution has been completely successful. Although the discussion of this problem and its solution will be limited to those systems which use the Color Graphics Adapter ("CGA") standard, nothing herein should be taken to limit the present invention to a system using the CGA standard only. The Enhanced Graphics Adapter ("EGA"), the Video Graphics Array ("VGA") and others could be readily accommodated by the present invention.
A known process by which color displays are generated using the CGA standard is illustrated in FIG. 1. When the system is operating in character mode, there are color control bits associated with each byte of character data. For the purposes of this description, the byte of character data comprises the character code ("CCode") and the color control bits are called the attribute byte. As shown in FIG. 1., after the central processing unit ("CPU") generates a display memory address at step 11, the CCode and attribute byte are retrieved from memory at step 13. The CCode is used to generate an address for accessing the font memory at step 15 and that address is used to retrieve the font pattern from memory at step 17. The font pattern is loaded into a shift register at step 19, where an On/Off serial bit stream is generated. Both the output generated by the shift register at step 19 and the attribute byte are used to select the desired background and foreground colors at step 21. The result of this selection is transmitted to a CRT for display. FIG. 1. also shows the average number of clock cycles required for each step beneath each step.
When a Liquid Crystal Display ("LCD?) or another, similar type of display is used, it is only capable of displaying a monochrome image. FIG. 2 shows how the CGA character display mode shown in FIG. 1 has been modified to accommodate this limitation. Steps 11, 13, 15, 17, 19 and 21 are identical with the same steps in FIG. 1. At step 23, the 4-bit color information is converted to a gray scale value using any one of many known gray scale conversion methods. The output from conversion step 23 is reassembled into 4 bits of pixel information at step 25 and then transmitted, 4 pixels at a time, to an LCD. Once again, the average number of clock cycles required for each of these steps is shown below each of the steps.
In order to deal with certain visual deficiencies which result from known gray scale conversion methods, a method and apparatus for improving the process was described in commonly-owned U.S. Pat. No. 4,977,398 ("'398"), entitled "Color to Monochrome Conversion" issued to Pleva et al., the contents of which application are hereby incorporated by reference for all purposes. The method used in the '398 patent modifies the attribute byte fetched in step 13 of FIGS. 1 and 2. As shown in FIG. 3, after the attribute byte has been fetched at step 13, it is transmitted to special hardware 28 which performs the following steps: at steps 27 and 29, the foreground and background colors are converted from their color codes to their gray scale equivalents. This conversion relies on an assumption that the way the colors are encoded is a logical way to convert them to a gray scale pattern. At step 31, the arithmetic difference between the foreground and background gray scales is compared. If the two calculated gray scales are very close to one another, and would not contrast sufficiently, the two gray scales are "pulled apart" to make the difference between them greater, making it easier to distinguish the foreground and background. The "pulling apart" is done by "increasing" the gray scale value for the "bigger" gray scale value and/or "decreasing" the gray scale value for the "smaller" gray scale. This occurs at steps 33 and 35. The remainder of the conversion process is identical to that shown in FIG. 2, and, as in FIG. 2, the approximate number of clock cycles required for each step is noted below each step.
Although the method taught in the '398 patent improves the gray scale presentation, it does have several deficiencies. In general, the direct conversion of the color code to gray scale used is not consistent with a "correct" conversion. In a "correct" conversion the gray scale conversion has the equivalent amount of energy or "brightness" to each of the colors in the color display. For the gray scale display to look visually correct, the translation of colors to gray scales has to be different.
Additionally, the algorithm used in the '398 patent is too rigid. As it is a mathematical method, the same translation/separation is applied to two gray scales anytime they have the same difference, regardless of the actual gray scales being used. If the situation is viewed subjectively, from a visual, "artistic" point of view, some , colors (yellow/white) are barely distinguishable even on a color CRT, whereas some combinations (blue/green or green/bright red) are quite distinguishable, in spite of their having the same gray scale difference. To accommodate these situations, the attribute bytes should be modified based on the specific foreground and background colors. This process, if done by random logic, would be very complex and still quite rigid.
The need exists for a color to gray scale conversion method and apparatus that can provide visually correct gray scale conversions, with the appropriate light energy levels for the background and foreground areas, and yet remain flexible for possible user modifications.